home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-22 | 3.8 KB | 84 lines | [TEXT/MSET] |
- VALUE n -- : name
- General purpose data variable defining word. Can use prefix operators to
- manipulate ( ->, ++>, etc.). Can also late bind to objects stored in values.
-
- VARIABLE -- : name
- standard Forth defining word. Use @ and ! for accessing. Will leave the addr
- at runtime.
-
- CONSTANT n -- : name
- standard. Creates a dictionary entry whose runtime action is to place n on
- the stack.
-
-
- ! n addr -- Stores 32-bit n at address.
- @ addr -- n fetches 32-bit value at address
- +! n addr -- Adds n to the longword at address.
- -! n addr -- Subtracts n from the longword at address.
-
- W! w addr -- Strores given 16-bit number into word at given address.
- W+! w addr -- Adds given 16-bit number to word at given address.
- W-! w addr -- Subtracts given 16-bit number from word at given address.
- W@ addr -- w Fetches 16-bit value from given address. Does not sign extend to 32-bits.
- W@X addr -- w Fetches 16-bit value from given address. Sign extends to 32-bits.
-
- C! c addr -- Stores given 8-bit number to byte at given address.
- C@ addr -- c Fetches 8-bit value from given address. Does not sign extend to 32-bits.
- C@X addr -- c Fetches 8-bit value from given address. Sign extends to 32-bits.
-
- CMOVE src dest cnt --
- Copies cnt bytes from src address to dest address. Cnt must be between 0 and
- 64K. Use move for a more general cnt.
- MOVE src dest cnt --
- As for CMOVE, but n may be anything. Implemented by calling the system
- BlockMove trap. This gives optimized handling of longer moves (n > 20 say).
- Also accounts for situations where the source and destination areas overlap.
- If you want byte propagation effects, use CMOVE instead. But what would you
- want this for, anyway, since we have FILL?
- ERASE addr n -- Clears (fills with zeros) memory starting at addr for n bytes.
- FILL addr n c -- Beginning at address, fills n bytes with given 8-bit value c.
-
- BRESET addr bit# -- Clears the bit. bit# can be >8.
- BSET addr bit# -- Sets the bit. bit# can be >8.
- BTEST addr bit# -- b Tests the bit and returns true if the bit is set, false otherwise.
- BTOGGLE addr bit# -- Inverts the bit. bit# can be >8.
-
- CRESET c addr -- Clears bits in byte at addr, corresponding to the bits SET in c.
- CSET c addr -- ORs c into the byte at addr.
- CTOGGLE c addr -- Exclusive-ORs c into the byte at addr.
-
- .W -- : word
- Performs a memory DUMP for 200 bytes starting at the nfa+1 of the following
- word in the input stream.
- DUMP addr len --
- Displays the contents of memory beginning at addr for len bytes in a hex and
- ascii format. Note that the \/ mark points to the requested address (the dump
- may start at an address other than addr.
-
-
- LOCAL -- : name { parm1 parm2 \ loc1 loc2 }
- Begins definition of a local section. Within a local section, all words have
- access to the parms/locals.
- MLOCAL -- : name { parm1 parm2 \ loc1 loc2 }
- Starts a local section for methods. See local.
- :LOC -- : name
- Commences the definition of the "main" word of a local section. The { ... }
- syntax is not used here, as it has already been done at LOCAL.
- :MLOC -- : name
- Commences the definition of the "main" method of a local section within a class
- definition.
- ;LOC -- Ends the definition of the "main" word, and ends the local section.
- ;MLOC -- Ends the definition of the "main" method, and ends the local section.
-
-
- ALIGN addr -- even-addr
- Increments addr by one if it is odd, leaving the next address. You can use
- align to make sure the 68000 will not try to access memory beginning at an odd
- address, which can cause a fatal error.
- NILH -- $FFA00101 A constant. The value we use for a nil handle.
- NILP -- $FFA00103 A constant. The value we use for a nil pointer.
-
- SAmask -- n
- A value. If you need to call _StripAddress, don't bother, we've done it for
- you. Just use SAmask as a mask on the address as in SAmask and.
-